package cl.blueprintsit.teaching.inheritance;

import junit.framework.Assert;

public class IPointTest {

    /**
     * This tests is responsible for testing that a new, non-argument, point, is created at the origin.
     *
     * @throws Exception
     */
    @org.junit.Test
    public void test2DPointIsOrigin() throws Exception {

        /* A point located at the origin is created */
        Point2D aPoint = new Point2D();

        Assert.assertTrue(aPoint.isOrigin());
    }

    /**
     * This tests is responsible for testing that a new, non-argument, point, is created at the origin.
     *
     * @throws Exception
     */
    @org.junit.Test
    public void test2DPointIsOriginArgumentInstance() throws Exception {

        /* A point located at the origin is created */
        Point2D aPoint = new Point2D(0, 0);

        Assert.assertTrue(aPoint.isOrigin());
    }

    /**
     * This tests is responsible for testing that a new, non-argument, point, is created at the origin.
     *
     * @throws Exception
     */
    @org.junit.Test
    public void testMove2DPointToOrigin() throws Exception {

        /* A point located at the origin is created */
        Point2D aPoint = new Point2D(1, 0);
        aPoint.move(new Point2D());

        Assert.assertTrue(aPoint.isOrigin());
    }

    /**
     * This tests is responsible for testing that a new, non-argument, point, is created at the origin.
     *
     * @throws Exception
     */
    @org.junit.Test
    public void testPolarPointIsOrigin() throws Exception {

        /* A point located at the origin is created */
        PointPolar pPoint = new PointPolar();

        Assert.assertTrue(pPoint.isOrigin());
    }

    /**
     * This tests is responsible for testing that a new, non-argument, point, is created at the origin.
     *
     * @throws Exception
     */
    @org.junit.Test
    public void testPolarPointIsOriginArgumentInstance() throws Exception {

        /* A point located at the origin is created */
        PointPolar pPoint = new PointPolar(0, 0);

        Assert.assertTrue(pPoint.isOrigin());
    }

    /**
     * This tests is responsible for testing that a new, non-argument, point, is created at the origin.
     *
     * @throws Exception
     */
    @org.junit.Test
    public void testMovePolarPointToOrigin() throws Exception {

        /* A point located at the origin is created */
        PointPolar pPoint = new PointPolar(1, 0);
        pPoint.move(new PointPolar());

        Assert.assertTrue(pPoint.isOrigin());
    }

    /**
     * This tests is responsible for testing that a new, non-argument, point, is created at the origin.
     *
     * @throws Exception
     */
    @org.junit.Test
    public void testCircleIsOrigin() throws Exception {

        /* A point located at the origin is created */
        Circle circle = new Circle(1, new PointPolar());

        Assert.assertTrue(circle.isOrigin());
    }
}
